package com.itheima.fanxing;
/*
使用自定义泛型类
 */
public class Demo02 {
    public static void main(String[] args) {

      /*  Box box = new Box();
        box.setBaobei(123);
        Object baobei = box.getBaobei();
        System.out.println(baobei);
        Integer i= (Integer) baobei;
        for (Integer integer = 0; integer < i; integer++) {

        }*/
        Box<Integer> box = new Box<>();
        box.setBaobei(100);
        Integer baobei = box.getBaobei();
        for (Integer integer = 0; integer < baobei; integer++) {

        }
    }
}
